package com.class06.chain;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/testFilter")
//@WebServlet(urlPatterns = "/testFilter")
// 多个过滤器拦截同一个资源时，先后顺序取决去文件排布的顺序。
public class ServletFromFilter extends HttpServlet{
    @Override
    protected void service(HttpServletRequest req,
                           HttpServletResponse resp) throws
            ServletException, IOException {
        System.out.println("目标资源被访问了");
    }
}
